package com.example.sql;

import android.app.Activity;
import android.os.Bundle;
import 	android.app.Dialog;
import 	android.content.Context;
import android.widget.Button;
import android.view.View.OnClickListener;
import 	android.view.View;


public class HelloSQL extends Activity
{
    /** Called when the activity is first created. */
	Dialog dialog_add;
	Dialog dialog_edit;
	final Context mContext = this;
	// Create an anonymous implementation of OnClickListener
	private OnClickListener mCorkyListener = new OnClickListener() {
    public void onClick(View v) {
      showDialogAdd();
    }
	};
	public void showDialogAdd()
	{
		
		Dialog dialog = new Dialog(mContext);
		dialog.setContentView(R.layout.menu_add);
		dialog.setTitle("Them");
		dialog.show();
	}
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
		// Capture our button from layout
		Button button = (Button)findViewById(R.id.button_add);
		// Register the onClick listener with the implementation above
		button.setOnClickListener(mCorkyListener);
    }
}
